package pers.zb.cloud.oauth.service;


import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import pers.zb.cloud.oauth.service.hystrix.UserServiceHystrix;

/**
 * 用户服务
 */
@FeignClient(value = "sea-cloud-service-upms", fallback = UserServiceHystrix.class)
public interface UserService {

    /**
     * 根据登录用户名获取用户信息
     *
     * @param userName 登录用户名
     * @param token 用户验证的access_token参数
     */
    @RequestMapping(value = "/upms/service/user/authorities/info/{name}")
    String getUserByName(@PathVariable("name") String userName, @RequestParam("access_token") String token);

}
